<!--<template>-->
<!--  <div class="app-container">-->


<!--    <el-col :span="24">-->
<!--      <el-form-item label="上传文件" prop="roomImage">-->
<!--        <el-upload-->
<!--          list-type="picture-card"-->
<!--          :auto-upload="true"-->
<!--          :class="[-->
<!--                  'uploadcard',-->
<!--                  upload.uploadDisabled ? 'disabled' : 'displaynone',-->
<!--                ]"-->
<!--          ref="upload"-->
<!--          :limit="upload.limit"-->
<!--          accept=".jpg, .jpeg, .png, .gif"-->
<!--          :headers="upload.headers"-->
<!--          :action="upload.url + '?updateSupport=' + upload.updateSupport"-->
<!--          :disabled="upload.isUploading"-->
<!--          :file-list="upload.fileList"-->
<!--          :on-progress="handleFileUploadProgress"-->
<!--          :on-success="handleFileSuccess"-->
<!--          :on-remove="handleRemove"-->
<!--          :on-preview="handlePictureCardPreview"-->
<!--        >-->
<!--          <i class="el-icon-plus"></i>-->
<!--        </el-upload>-->
<!--      </el-form-item>-->
<!--    </el-col>-->
<!--  </div>-->
<!--</template>-->

<!--<script>-->
<!--import { getToken } from "@/utils/auth";-->
<!--import {-->
<!--  listSysattachments,-->
<!--  getSysattachments,-->
<!--  delSysattachments,-->
<!--  addSysattachments,-->
<!--  updateSysattachments,-->
<!--  exportSysattachments,-->
<!--} from "@/api/system/sysattachments";-->
<!--export default {-->
<!--  name: "RoomInformations",-->
<!--  data() {-->
<!--    return {-->

<!--      // 用户导入参数-->
<!--      upload: {-->
<!--     // 是否显示弹出层（用户导入）-->
<!--          open: false,-->
<!--          // 弹出层标题（用户导入）-->
<!--          title: "",-->
<!--          limit: 9,-->
<!--          // 是否禁用上传-->
<!--          isUploading: false,-->
<!--          uploadDisabled: false,-->
<!--          // 是否更新已经存在的用户数据-->
<!--          updateSupport: 0,-->
<!--          // 设置上传的请求头部-->
<!--          headers: { Authorization: "Bearer " + getToken() },-->
<!--        // 上传的地址-->
<!--        url: process.env.VUE_APP_BASE_API + "/common/upload/ROOM_IMG",-->
<!--        baseUrl: process.env.VUE_APP_BASE_API,-->
<!--        fileList:[]-->
<!--      },-->
<!--      fileList:[],-->
<!--      // 表单参数-->
<!--      form: {},-->
<!--    };-->
<!--  },-->
<!--  created() {-->
<!--  },-->
<!--  methods: {-->
<!--    /******************图片部分**开始*************************/-->
<!--    //预览-->
<!--    handlePictureCardPreview(file){-->
<!--      this.dialogImageUrl = file.url;-->
<!--        this.dialogVisible = true;-->
<!--    },-->
<!--    //删除-->
<!--    handleRemove(file, fileList) {-->
<!--      this.upload.fileList = fileList;-->
<!--      if (fileList.length < this.upload.limit) {-->
<!--        this.upload.uploadDisabled = false;-->
<!--      }-->
<!--    },-->
<!--    // 文件上传中处理-->
<!--    handleFileUploadProgress(event, file, fileList) {-->
<!--      this.upload.isUploading = true;-->
<!--    },-->
<!--    // 文件上传成功处理-->
<!--    handleFileSuccess(response, file, fileList) {-->
<!--      console.log(fileList)-->
<!--      if (fileList.length == this.upload.limit) {-->
<!--        this.upload.uploadDisabled = true;-->
<!--      }-->
<!--      this.upload.open = false;-->
<!--      this.upload.isUploading = false;-->
<!--      this.upload.fileList = fileList;-->
<!--      let length = fileList.length;-->
<!--      this.upload.fileList[length - 1].url = process.env.VUE_APP_BASE_API + response.fileName;-->
<!--    },-->
<!--    /******************上传部分**结束*************************/-->

<!--    /** 新增按钮操作 */-->
<!--    handleAdd() {-->
<!--      this.reset();-->
<!--      this.disabledtype = false;-->
<!--      this.open = true;-->
<!--      this.title = "添加房间信息";-->
<!--    },-->
<!--    /** 修改按钮操作 */-->
<!--    handleUpdate(row) {-->
<!--      let me = this;-->
<!--      this.reset();-->
<!--      this.disabledtype = false;-->
<!--      const id = row.id || this.ids;-->
<!--      getRoomInformations(id).then((response) => {-->
<!--        this.form = response.data;-->
<!--        this.open = true;-->
<!--        this.title = "修改房间信息";-->
<!--        listSysattachments({ relId: id, attachType: "ROOM_IMG" }).then(-->
<!--          (response) => {-->
<!--               let rows = response.rows;-->
<!--            for(let i in rows){-->
<!--               rows[i].url = me.upload.baseUrl + rows[i].filePath;-->
<!--               rows[i].name = rows[i].fileName;-->
<!--            }-->
<!--            me.upload.fileList = rows;-->
<!--            if(me.upload.fileList.length >= me.upload.limit){-->
<!--              me.upload.uploadDisabled = true;-->
<!--            }-->
<!--          }-->
<!--        );-->
<!--      });-->
<!--    },-->
<!--    /** 提交按钮 */-->
<!--    submitForm: function () {-->
<!--        let me = this;-->
<!--        this.$refs["form"].validate(valid = > {-->
<!--            if(valid) {-->
<!--                if (me.upload.fileList) {-->
<!--                    let arr = [];-->
<!--                    for (let i in me.upload.fileList) {-->
<!--                        let obj = {-->
<!--                            url: me.upload.fileList[i].url.replace(me.upload.baseUrl, ""),-->
<!--                            name: me.upload.fileList[i].name-->
<!--                        }-->
<!--                        arr.push(obj);-->
<!--                    }-->
<!--                    me.form.fileList = arr;-->
<!--                }-->
<!--                if (this.form.id != undefined) {-->
<!--                    updateRoomInformations(this.form).then((response) = > {-->
<!--                        if(response.code === 200-->
<!--                )-->
<!--                    {-->
<!--                        this.msgSuccess("修改成功");-->
<!--                        this.open = false;-->
<!--                        this.getList();-->
<!--                    }-->
<!--                })-->
<!--                    ;-->
<!--                } else {-->
<!--                    addRoomInformations(this.form).then((response) = > {-->
<!--                        if(response.code === 200-->
<!--                )-->
<!--                    {-->
<!--                        this.msgSuccess("新增成功");-->
<!--                        this.open = false;-->
<!--                        this.getList();-->
<!--                    }-->
<!--                })-->
<!--                    ;-->
<!--                }-->
<!--            }-->
<!--        }-->
<!--    )-->
<!--        ;-->
<!--    }-->
<!--};-->
<!--</script>-->
